/***********************************************************************************
    Filename: hal_digio.h

    Copyright 2007 Texas Instruments, Inc.
***********************************************************************************/

#ifndef  __HAL_EXT_INT_H__
#define  __HAL_EXT_INT_H__

#ifdef __cplusplus
extern "C" {
#endif

#include   "Typedef.h"
  
//----------------------------------------------------------------------------------
// Macros declarations
//----------------------------------------------------------------------------------

#define   HAL_EXT_INT_LOW_LEVEL            (0x00)
#define   HAL_EXT_INT_ANY_CHANGE           (0x01) 
#define   HAL_EXT_INT_FALLING_EDGE         (0x02)
#define   HAL_EXT_INT_RISING_EDGE          (0x03)

#define   HAL_AVR_INT0                     (0x01)
#define   HAL_AVR_INT1                     (0x02)  
#define   HAL_AVR_INT2                     (0x03) 

#define   HAL_EXT_INT_OK       0
#define   HAL_EXT_INT_ERROR  (~0)
//----------------------------------------------------------------------------------
// Function declarations
//----------------------------------------------------------------------------------


INT8U halExtIntConnect(INT8U ext_int_num, ISR_FUNC_PTR func);
INT8U halExtIntEnable(INT8U ext_int_num);
INT8U halExtIntDisable(INT8U ext_int_num);
INT8U halExtIntClear(INT8U ext_int_num);
INT8U halExtIntSetType(INT8U ext_int_num, INT8U type);
INT8U halExtIntGetFlag(INT8U ext_int_num);

#ifdef  __cplusplus
}
#endif

/**********************************************************************************/
#endif